package com.example.androidkt.fifth

import androidx.databinding.BaseObservable
import androidx.databinding.ObservableField
import androidx.databinding.ObservableInt
//import androidx.databinding.library.baseAdapters.BR

class User {
    var name = "wxr"
    var age = 18
    var desc = "妮子很美"
}

class ObserveUser : BaseObservable() {

    var desc = ""
        set(value) {
//            notifyPropertyChanged(BR)
            field = value + "winner"
        }
        get() {
            return "$field baby winner"
        }
}

//class ObserveFieldUser{
//    var name = ObservableField("baby")
//    var age = ObservableInt(18)
//    var desc = ObservableField("baby 好美")
//
//    var str = "age $age name $name desc$desc"
//}